public abstract class CPU implements Component {
    private String name;
    private int coreNum;
    private double price;
    CPU(String name,int coreNum,double price){
        this.name = name;
        this.coreNum = coreNum;
        this.price = price;
    }
    public abstract void work();

    public String getName() { return name; }
    public double getcoreNum() { return coreNum; }
    public double getPrice() { return price; }
    public void setName(String name) { this.name = name; }
    public void setPrice(double price) { this.price = price; }
}
